#ifndef VASH_UTILITIES
	#define VASH_UTILITIES
	#include <string>
	#include <vector>
	#include <unistd.h>

	typedef std::vector<std::string> SVector;
	typedef std::pair< std::string,SVector > SWPair;
	typedef std::vector< SWPair > ValueTable;


	std::string getHomePath();
	SVector getPaths();

	bool checkPathExists(std::string path,std::string base = "");
	bool checkPathIsDir(std::string path,std::string base = "");
	bool checkPathIsFile(std::string path,std::string base = "");
	bool checkFileIsExec(std::string path,std::string base = "");
	std::string getFileModTime(std::string path);
	SVector getPathFiles(std::string path,std::string base = "");
	bool createPath(std::string path,std::string base = "");
	int getSelection(const char * selected,const char ** selections,int options);

	std::ostream & operator<<(std::ostream & os,const ValueTable & vt);
	SWPair makeSWPair(std::string column,std::string row[],size_t rows);
	void operator+=(ValueTable & vt,const SWPair & pair);

	int redirectFd(int old_fd,int new_fd);
	int redirectFd(int old_fd,std::string file);
#endif